package cz.semjobKB.knowledge.impl;

import cz.semjobKB.conllx.api.IWord;
import cz.semjobKB.knowledge.api.ITripleItem;

public class TripleItem implements ITripleItem{
	
	IWord subject;
	IWord predicate;
	IWord object;
	boolean isComplete;
	
	public TripleItem (IWord subject, IWord predicate, IWord object, boolean isComplete) {
		
		this.subject = subject;
		this.predicate = predicate;
		this.object = object;
		this.isComplete = isComplete;
	}	

	
	public boolean isCompleteTriple() {
		return isComplete;
	}

	
	public String getSubjectLemma() {		
		if (subject != null) {
			return subject.getLemma();
		}
		return null;
	}

	
	public String getSubjectWord() {
		if (subject != null) {
			return subject.getText();
		}
		return null;
	}

	
	public String getPredicateLemma() {
		if (predicate != null) {
			return predicate.getLemma();
		}
		return null;
	}

	
	public String getPredicateWord() {
		if (predicate != null) {
			return predicate.getText();
		}
		return null;
	}

	
	public String getObjectLemma() {
		if (object != null) {
			return object.getLemma();
		}
		return null;
	}

	
	public String getObjectWord() {
		if (object != null) {
			return object.getText();
		}
		return null;
	}
	

}
